package com.itheima.service;

import com.itheima.domain.Account;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author 王加鑫
 * @Date 2021/08/04 16:27
 * @Since JDK 1.8
 */

public interface AccountService {

    void save(Account account);

    void update(Account account);

    void delete(Integer id);

    Account findById(Integer id);

    List<Account> findAll();

    @Transactional(propagation = Propagation.REQUIRED,
                   isolation = Isolation.DEFAULT,
                   readOnly = false
    )
    void transfer(Double money,Integer id1,Integer id2);

    
}
